import { computed } from "vue";
import { useProjectSettingStore } from "@/store/modules/projectSetting";

export function useProjectSetting() {
  const projectStore = useProjectSettingStore();

  // 权限控制模式 前端/后端控制路由
  const getPermissionMode = computed(() => projectStore.permissionMode);

  // 导航模式 左侧菜单/顶部菜单
  const getNavMode = computed(() => projectStore.navMode);

  // 获取主题
  const getNavTheme = computed(() => projectStore.navTheme);

  // 获取顶部设置
  const getHeaderSetting = computed(() => projectStore.headerSetting);

  // 路由菜单设置
  const getMenuSetting = computed(() => projectStore.menuSetting);

  // 面包屑设置
  const getCrumbSetting = computed(() => projectStore.crumbSetting);

  // 多标签
  const getMultiTabsSetting = computed(() => projectStore.multiTabsSetting);

  // 是否开启路由动画
  const getIsPageAnimate = computed(() => projectStore.isPageAnimate);

  // 路由动画类型
  const getPageAnimateType = computed(() => projectStore.pageAnimateType);

  return {
    getPermissionMode,
    getNavMode,
    getNavTheme,
    getHeaderSetting,
    getMenuSetting,
    getCrumbSetting,
    getMultiTabsSetting,
    getIsPageAnimate,
    getPageAnimateType,
  };
}
